﻿<%@ Page Title="Uživatel nenalezen" Language="C#" MasterPageFile="~/Pages/Site.Master" AutoEventWireup="true" CodeBehind="Profile.aspx.cs" Inherits="Altairis.FluffyCloud.WebCore.Pages.Users.Profile" %>
<asp:Content ContentPlaceHolderID="Main" runat="server">
    <asp:FormView ID="FormView" runat="server" ItemType="Altairis.FluffyCloud.Data.User" SelectMethod="FormView_GetItem">
        <EmptyDataTemplate>
            <h1>Uživatel nenalezen</h1>
            <p>Uživatel tohoto jména neexistuje.</p>
        </EmptyDataTemplate>
        <ItemTemplate>
            <altairis:PageTitle runat="server" Mode="Set" Text='<%#: "Uživatel " + Item.UserName.ToUpper() %>' />
            <hgroup>
                <h1><%#: "Uživatel " + Item.UserName.ToUpper() %></h1>
                <div class="species"><%#: Item.Species %></div>
                <div class="comment"><%#: Item.Comment %></div>
            </hgroup>
            <my:UserIcon runat="server" UserName="<%# Item.UserName %>" Size="150" CssClass="userpic" NavigateUrl='<%# this.GetRouteUrl("MyUserMessages", new { userName = Item.UserName }) %>' ToolTip="Poslat zprávu tomuto uživateli" />
            <div class="description">
                <my:WikiMarkup runat="server" Text="<%# Item.Description %>" />
            </div>
            <fieldset>
                <legend>Uživatel</legend>
                <table class="details">
                    <tr>
                        <th>Datum registrace:</th>
                        <td><%#: Item.DateCreated.ToLocalDisplayFormat() %></td>
                    </tr>
                    <tr>
                        <th>Naposledy aktivní:</th>
                        <td><%#: Item.DateLastActivity.HasValue ? Item.DateLastActivity.Value.ToLocalDisplayFormat() : "nikdy" %></td>
                    </tr>
                    <asp:PlaceHolder runat="server" Visible='<%# this.User.IsInRole(Altairis.FluffyCloud.Data.Role.AdministratorsRoleName) %>'>
                        <tr>
                            <th>Poslední přihlášení:</th>
                            <td><%#: Item.DateLastLogin.HasValue ? Item.DateLastLogin.Value.ToLocalDisplayFormat() : "nikdy" %></td>
                        </tr>
                        <tr>
                            <th>Poslední změna hesla:</th>
                            <td><%#: Item.DateLastPasswordChange.ToLocalDisplayFormat() %></td>
                        </tr>
                    </asp:PlaceHolder>
                    <asp:PlaceHolder runat="server" Visible='<%# Item.AccessList.EvaluatePermissions(UserAclEntry.OperationReadProfilePersonal) %>'>
                        <tr>
                            <th>Jméno a příjmení:</th>
                            <td><%#: Item.FullName %></td>
                        </tr>
                        <tr>
                            <th>Město:</th>
                            <td><%#: Item.City %></td>
                        </tr>
                        <tr>
                            <th>Věk:</th>
                            <td><%#: Item.Age.HasValue ? string.Format("{0} let", Item.Age) : string.Empty %></td>
                        </tr>
                    </asp:PlaceHolder>
                </table>
            </fieldset>
            <asp:PlaceHolder runat="server" Visible='<%# Item.AccessList.EvaluatePermissions(UserAclEntry.OperationReadProfileContacts) %>'>
                <fieldset>
                    <legend>Kontakty</legend>
                    <table class="details">
                        <tr>
                            <th>Osobní stránka:</th>
                            <td><a href="<%#: Item.HomePage %>"><%#: Item.HomePage %></a></td>
                        </tr>
                        <tr>
                            <th>Telefonní číslo:</th>
                            <td><%#: Item.PhoneNumber %></td>
                        </tr>
                        <tr>
                            <th>ICQ UIN:</th>
                            <td>
                                <asp:HyperLink runat="server" NavigateUrl='<%# "http://web.icq.com/" + Item.Icq %>' ImageUrl='<%# "http://www.icq.com/whitepages/online?img=5&icq=" + Item.Icq %>' Text="<%#: Item.Icq %>" Visible="<%# !string.IsNullOrEmpty(Item.Icq) %>" ImageWidth="18px" ImageHeight="18px" Style="float: left; margin-right: .5ex" />
                                <asp:HyperLink runat="server" NavigateUrl='<%# "http://web.icq.com/" + Item.Icq %>' Text="<%#: Item.Icq %>" Visible="<%# !string.IsNullOrEmpty(Item.Icq) %>" />
                            </td>
                        </tr>
                        <tr>
                            <th>MSN/Live Messenger:</th>
                            <td><%#: Item.MsnMesseger %></td>
                        </tr>
                        <tr>
                            <th>Jabber:</th>
                            <td><%#: Item.Jabber %></td>
                        </tr>
                        <tr>
                            <th>Twitter:</th>
                            <td><a href='<%#: "https://twitter.com/" + Item.Twitter %>'><%#: Item.Twitter %></a></td>
                        </tr>
                        <tr>
                            <th>Facebook:</th>
                            <td><a href='<%#: "https://facebook.com/" + Item.Facebook %>'><%#: Item.Facebook %></a></td>
                        </tr>
                        <tr>
                            <th>IRC FurNet:</th>
                            <td><%#: Item.FurNet %></td>
                        </tr>
                        <tr>
                            <th>Skype:</th>
                            <td><a href='<%#: "callto:" + Item.Skype %>'><%#: Item.Skype %></a></td>
                        </tr>
                        <tr>
                            <th>FurAffinity:</th>
                            <td><a href='<%#: "https://www.furaffinity.net/user/" + Item.FurAffinity %>'><%#: Item.FurAffinity %></a></td>
                        </tr>
                        <tr>
                            <th>DeviantArt:</th>
                            <td><a href='<%#: string.Format("http://{0}.deviantart.com", Item.DeviantArt)  %>'><%#: Item.DeviantArt %></a></td>
                        </tr>
                    </table>
                </fieldset>
            </asp:PlaceHolder>
        </ItemTemplate>
    </asp:FormView>
</asp:Content>